package com.elegant.code.spi.web.gateway.zk;

import com.elegant.code.spi.web.gateway.Constants;
import org.I0Itec.zkclient.ZkClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ZkConfig {

    @Bean
    public ZkClient zkClient(){
        ZkClient zkClient = new ZkClient(Constants.REGISTER_ADDRESS,
                Constants.ZK_SESSION_TIMEOUT,
                Constants.ZK_CONNECTION_TIMEOUT);
        return zkClient;
    }
}
